﻿//=============================================================================
// Project  : NIPO Component Framework
// File    : OutputPlugin.cs
// Author  : Bernhard Dieber (Bernhard.Dieber@uni-klu.ac.at)
// Copyright 2010 by Bernhard Dieber
// This code is published under the Microsoft Public License (Ms-PL).  A copy
// of the license should be distributed with the code.  It can also be found
// at the project website: http://NIPO.CodePlex.com.   This notice, the
// author's name, and all copyright notices must remain intact in all
// applications, documentation, and source files.
//=============================================================================

using System.Collections.Generic;
using NIPO.Data;

namespace NIPO.Plugins
{
    /// <summary>
    /// An output plugin performs the output operations in a NIPO instance. An instance can have multiple output channels (for each channel,one Outputplugin is used).<br />
    /// An output Plugin instance receives new data from the processing plugin via the <see cref="OutputPlugin.OutputData"/> method which is registered as eventhandler for <see cref="ProcessingPlugin.NewData"/> by default.<br />
    /// </summary>
    /// <remarks>To implement a new OutputPlugin inherit from <see cref="OutputPlugin"/><br />
    /// The <see cref="OutputPlugin.OutputData"/> method is automatically registered as eventhandler of <see cref="ProcessingPlugin.NewData"/> event. In this method perform your output tasks.<br />
    /// </remarks>
    public abstract class OutputPlugin : IPOPlugin
    {
        ///<summary>
        /// This method receives data from the preceeding processing plugin.
        ///</summary>
        ///<param name="sender">Reference to the sending plugin (instance of <see cref="ProcessingPlugin"/>)</param>
        ///<param name="e">ArgumentsVector containing the data</param>
        public abstract void OutputData(object sender, NIPOEventArgs e);


        internal override void InternalReset()
        {
        }
    }
}